<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    const obj = {
        name: 'aaa',
        age: 19,
        run: function () {
            console.log("hello");
        }
    }

    // 1. 属性的增强写法
    const name = 'bbb'
    const age = 18
    const obj = {
        name,
        age
    }

    // 2. 函数的增强写法
    const obj = {
        run() {

        },
        eat() {

        }
    }
</script>
</body>
</html>